<template>
  <div>
    <van-row>
      <van-col span="8"><van-icon name="arrow-left" /></van-col>
      <van-col span="8">客户新增</van-col>
      <van-col span="8" class="box"
        ><img src="../assets/我的客户/系统功能.png" alt=""
      /></van-col>
    </van-row>
    <van-cell-group>
      <van-field v-model="valuekhmc" label="客户名称"  />
      <van-field v-model="tellxfs" type="tel" label="联系方式" />
    </van-cell-group>
      <van-cell-group>
      <van-field v-model="valuexl" label="学历"  />
      <van-field v-model="valuenl" label="年龄"  />
      <van-field v-model="valuexb" label="性别"  />
      <van-field v-model="valuesscs" label="所属城市"  />
      <van-field v-model="valuegsmc" label="公司名称"  />
      <van-field v-model="valuezw" label="职务"  />
    </van-cell-group>
    <div class="app">
        <van-button round type="info" @click="add">保存</van-button>
    </div>
    
  </div>
  <!-- 


custName	string	true	普通参数	客户名称	
cityName	string	true	普通参数	所属地市	
company	string	true	普通参数	公司名称	
position	string	true	普通参数	职务	
telephone	string	true	普通参数	联系方式	
education	string	true	普通参数	学历	
sex	string	true	普通参数	性别	
age	number	true	普通参数	年龄

   -->
</template>

<script>
import {CustpostData} from '../request/api'
export default {
  data() {
    return {
        valuekhmc:'',
        tellxfs:'',
        valuexl:'',
        valuenl:'',
        valuexb:'',
        valuesscs:'',
        valuegsmc:'',
        valuezw:'',
    };
  },
  methods:{
      
      add(){
        //   console.log(JSON(this.valuekhmc));
         CustpostData({
             custName:this.valuekhmc,
             cityName:this.valuesscs,
             company:this.valuegsmc,
             position:this.valuezw,
             telephone:this.tellxfs,
             education:this.valuexl,
             sex:this.valuexb,
             age:this.valuenl,
         }).then(res=>{
             console.log(res);
         })
      }
  }
};
</script>
 
<style lang = "less" scoped>
.van-row {
  padding: 20px;
  background-color: blue;
  .box {
    text-align: right;
  }
  img {
    width: 30px;
    height: 30px;
  }
}
.van-cell-group{
    margin-bottom: 10px;
}
.app{
    padding-left: 30px;
    .van-button{
    
    width: 90%;
    height: 50px;
    line-height: 50px;
    text-align: center;
}
}

</style>